"""stu_manage URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.urls import path, include, re_path
from django.views.static import serve
from rest_framework.routers import DefaultRouter

from survey.views import *

router = DefaultRouter()

router.register('survey', SurveyView, basename='survey')
router.register('user', UserView, basename='user')
router.register('submit_survey', SubmitSurveyView, basename='submit_survey')

urlpatterns = [
    path('login', LoginView.as_view()),
    path('register', RegisterView.as_view()),
    path('userinfo', UserInfoView.as_view()),
    path('image', ImageView.as_view()),
    path('file', FileView.as_view()),
    path('filesuccess', FileSuccessView.as_view()),
    path('all_area', AreaView.as_view()),
    path('my_submit_survey', MySubmitSurveyView.as_view()),
    path('submit/<int:pk>/', SubmitView.as_view()),
    path('my_survey', MySurveyView.as_view()),
    path('survey_detail/<int:pk>/', SurveyDetailView.as_view()),
    path('pack/<int:pk>/', PackView.as_view()),
    path('check', CheckView.as_view()),
]
urlpatterns += router.urls
